package com.fz.us.oa.core.entity.com;


import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.User;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;


/**
 * Created by ZhuChunXiao on 2017/12/5.
 * 财务模块-借款申请
 */
@Entity
@Table(name="ec_loanApply")
public class LoanApply extends BaseFlowEntity {


    private static final long serialVersionUID = 5909981688505286458L;

    /**
     * 申请人
     */
    private User applicant;

    /**
     * 事由
     */
    private String reason;

    /**
     * 申请金额（元）
     */
    private BigDecimal amount;

    /**
     * 借用日期
     */
    private Date borrowDate;

    /**
     * 预计归还日期
     */
    private Date expectedReturnDate;

    /**
     * 是否归还 0未归还 1已归还
     */
    private int isReturn;

    /**
     * 实际归还日期
     */
    private Date factReturnDate;

    @ManyToOne(fetch = FetchType.LAZY)
    public User getApplicant() {
        return applicant;
    }

    public void setApplicant(User applicant) {
        this.applicant = applicant;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Date getBorrowDate() {
        return borrowDate;
    }

    public void setBorrowDate(Date borrowDate) {
        this.borrowDate = borrowDate;
    }

    public Date getExpectedReturnDate() {
        return expectedReturnDate;
    }

    public void setExpectedReturnDate(Date expectedReturnDate) {
        this.expectedReturnDate = expectedReturnDate;
    }

    public int getIsReturn() {
        return isReturn;
    }

    public void setIsReturn(int isReturn) {
        this.isReturn = isReturn;
    }

    public Date getFactReturnDate() {
        return factReturnDate;
    }

    public void setFactReturnDate(Date factReturnDate) {
        this.factReturnDate = factReturnDate;
    }
}
